<template>
  <div>
    <p>检查到您未登录哦~是否前往登录？</p>
    <button @click="toLogin">是</button>
    <button @click="toHome">返回首页</button>
  </div>
</template>
<script>
import { getCurrentInstance } from 'vue'
export default {
  setup () {
    const { ctx, proxy } = getCurrentInstance()
    function toLogin () {
      proxy.$router.push('/login')
    }
    function toHome () {
      proxy.$router.push('/')
    }
    return {
      toLogin,
      toHome
    }
  }
}
</script>
